package com.dayuanit.dy15.spider.util;

import java.util.concurrent.ThreadLocalRandom;

public class SleepUtil {
    //时间的问题
    public static final int[] sleepTimes = {200, 500, 1000, 1200, 1500, 300, 600, 700, 800, 2100};

    public static void sleep() {
        int index = ThreadLocalRandom.current().nextInt(sleepTimes.length);
        try {
            Thread.sleep(sleepTimes[index]);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
